@import '~@alife/aisc-core/purple/scss/index.scss';
$color-blocker: #f36479;
$color-critical: #fbc02d;
$color-major: #c4c6cf;

.file {
  margin-bottom: 8px;
  &-header {
    display: flex;
    background: #fff;
    border: 1px solid #e6e7eb;
    min-height: 40px;
    line-height: 37px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
    padding-right: 10px;
    &:hover {
      background: $color-s3-1;
    }
    &-level {
      width: 76px;
      text-align: center;
      &-blocker {
        background: #ffebee;
        border-left: 4px solid #fe516b;
        color: #e93a3a;
      }
      &-critical {
        background: #fff7e9;
        border-left: 4px solid #fbc02d;
        color: #fb8c00;
      }
      &-major {
        background: #ebecf0;
        border-left: 4px solid #999;
        color: #666;
      }
    }
    &-title {
      flex: 1;
      margin-left: 12px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    &-right {
      flex: none;
      display: flex;
      justify-content: flex-end;
      &-item {
        margin-left: 16px;
        flex: none;
      }
    }
  }
  &-path {
    line-height: 22px;
    font-size: 16px;
    color: #333;
    margin-bottom: 4px;
  }
}

.issue {
  position: relative;
  font-size: 14px;
  margin-bottom: 4px;
  &:last-child {
    margin-bottom: 0;
  }
  &.status-Fixed {
    filter: grayscale(100%);
    -webkit-filter: grayscale(100%);
    -moz-filter: grayscale(100%);
    -ms-filter: grayscale(100%);
    -o-filter: grayscale(100%);
  }
  .issue-header-title {
    color: $gray-07;

    // hack为改版at样式
    p {
      margin: 1em 0;
    }
  }
  // 源码漏洞检查中明确不需要描述时,隐藏描述和箭头
  &.no-desc {
    .issue-body {
      display: none;
    }
    .issue-header-right-item:last-child {
      display: none;
    }
  }
  &-header {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e6e7eb;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    padding: 6px 10px;
    &:hover {
      background: $color-s3-1;
    }
    &:last-child {
      border-radius: 4px;
    }
    &-level {
      width: 66px;
    }
    &-title {
      flex: 1;
      margin: 0 16px;
    }
    &-status {
      margin: 0;
    }
    &-right {
      flex: none;
      display: flex;
      justify-content: flex-end;
      &-item {
        margin-left: 16px;
      }
    }
  }
  &-body {
    background: #fff;
    border: 1px solid #e6e7eb;
    border-top: 0;
    border-radius: 0 0 4px 4px;
    padding: 8px 12px;
    color: #333;
    img {
      max-width: 780px;
    }
  }
  &-rule {
    &-title {
      display: flex;
      align-items: center;
    }
    &-name {
      font-size: 15px;
      font-weight: bolder;
      flex: auto;
      word-break: break-all;
    }
    &-info {
      flex: none;
      justify-content: flex-end;
      display: flex;
      color: #999;
      &-item {
        margin-left: 12px;
      }
    }
    &-section {
      margin-top: 14px;
      &-title {
        text-align: left;
        line-height: 20px;
        font-size: 14px;
        color: #666;
        margin-bottom: 6px;
        font-weight: bold;
        &-right {
          float: right;
          color: #999;
        }
      }
    }
    &-suggestion {
      white-space: pre-wrap;
      word-wrap: break-word;
    }
    &-not-find {
      text-align: center;
    }
  }
}

.blob {
  width: 100%;
  border-spacing: initial;
  &-container {
    border: 1px solid #e6e7eb;
    border-radius: 0 0 4px 4px;
  }
  &-line {
    font-size: 12px;
    line-height: 20px;
    font-family: Menlo-Regular, Consolas, Courier, monospace;
    &-num {
      padding: 0 1ch;
      text-align: right;
      vertical-align: top;
      background-color: #f8f9fa;
      color: #9b9b9b;
      border-right: 1px solid #ddd;
      &-col {
        width: 6ch;
      }
    }
    &-content {
      white-space: pre-wrap;
      word-wrap: break-word;
      word-break: break-all;
      padding-left: 0.5em;
    }
    &-acitve {
      background: #e8feea;
    }
    &.expand-line {
      cursor: pointer;
      line-height: 1.5;
      .blob-line-num {
        background: #ebecf0;
        color: #999;
        border-right: 1px solid #dcdee3;
        border-top: 1px solid #e6e7eb;
        border-bottom: 1px solid #e6e7eb;
      }
      .blob-line-content {
        text-align: center;
        color: #999;
        padding: 4px 0 3px 6px;
        border-top: 1px solid #e6e7eb;
        border-bottom: 1px solid #e6e7eb;
      }
    }
    &:first-of-type.expand-line .blob-line-content {
      border-top: 0;
    }
    &:last-of-type.expand-line .blob-line-content {
      border-bottom: 0;
    }
  }
  &-inline-container {
    padding: 10px 12px;
    border-top: 1px solid #f2f3f7;
    border-bottom: 1px solid #f2f3f7;
    background: #fff;
  }
}
